
  <div id="content" class="clear">
  <div id="main" class="clear">
  <div id="head" class="clear">
  <h1>产品列表</h1>
  <div id="actions"> 
  <a href="#" class="button secondary">Delete items</a> 
  <a href="#" class="button secondary">Export items</a>
<a href="<?php echo base_url('product/post'); ?>" class="button primary">添加产品</a>
</div>
<!-- end page actions-->
</div>
<div id="topOptions" class="clear">
<form id="formBulkActions" action="#" method="get">
<div id="bulkActions"> 
<label for="selBulkActions">Selected items:</label> 
<select id="selBulkActions" onchange="doit(this,'article')"> 
	<option selected="selected">- choose action -</option> 
	<option>delete</option> 
	<option>deactivate</option>
	<option>activate</option> 
	<option>export</option>
</select>
 </div>
 </form>
 <ul class="pagination">
   <li class="button small pagePrev">
    <a href="#" title="Previous page">Previous</a></li>
      <?php for($i=1;$i<=$count_page;$i++){?>
       <li> <a href="<?php echo base_url('article/index')."/".$i; ?>"><?php echo $i;?></a></li>
      <?php }?>
           <li class="button small pageNext"> <a href="#" title="Next page">Next</a></li>
 </ul>
</div>
<?php echo validation_errors(); ?>
<?php echo form_open('#',array('name'=>'form1','id'=>'form1'));?>
<table id="tableItems" class="clear" cellpadding="0" cellspacing="0">
<thead>
   <tr><th class="colCheck"> <input id="cbSelectAll" type="checkbox" onclick="checkall()" /></th>
         <th class="colCount sortable sorted desc"> <a href="#">id</a></th>
         <th class="colName left sortable"> <a href="#">产品名称</a></th>
         <th class="colPosition">分类</th>
         <th class="colStatus sortable"> <a href="#">status</a></th>
         <th class="colActions right">Actions</th>
   </tr>
   </thead>
   <tbody id="articlelist">

   <?php
		  foreach($products as $key=>$row)
		  { 
		  	?>
   <?php if($key%2 == 0){?>		  	
   <tr class="odd"> 
       <td class="colCheck"> <input name="cbSelect[]" value="<?php echo $row['pid'];?>" type="checkbox" /></td> 
        <td class="colCount"> <?php echo $row['pid']; ?></td>
       <td class="colName left"> <a href="<?php echo base_url('home/show')."/".$row['pid']; ?>" target="_blank"><?php echo $row['product_name']; ?></a></td> 
        <td class="colPosition"><?php echo $row['product_cat']; ?></td>
	   <td class="colStatus"> 
       <a href="<?php echo base_url('product/activate').'/'.$row['pid'];?>">
        <?php if($row['is_show'] == 1){?> <img src="<?php echo base_url()?>img/ico/icostatusgreen.png" alt="Active" />
        <?php }else{?>
        <img src="<?php echo base_url()?>img/ico/icostatusyellow.png" alt="Waiting" />
        <?php }?>
       </a></td> 
       
       <td class="colActions right"> <a class="actionEdit" href="<?php echo base_url('product/edit')."/".$row['pid']; ?>">Edit</a> <a class="actionDelete" href="<?php echo base_url('product/drop')."/".$row['pid'];?>">Delete</a></td>
   </tr>
   <?php }else{ ?>
   <tr class="even"> 
      <td class="colCheck">
          <input name="cbSelect[]" value="<?php echo $row['pid'];?>" type="checkbox" /></td> 
     <td class="colCount"> <?php echo $row['pid']; ?></td>
     <td class="colName left"> <a href="<?php echo base_url('home/show')."/".$row['pid']; ?>" target="_blank"><?php echo $row['product_name']; ?></a></td> 
      <td class="colPosition"><?php echo $row['product_cat']; ?></td>  
     <td class="colStatus"> <a href="#"> <?php if($row['is_show'] == 1){?> <img src="<?php echo base_url()?>img/ico/icostatusgreen.png" alt="Active" />
        <?php }else{?>
        <img src="<?php echo base_url()?>img/ico/icostatusyellow.png" alt="Waiting" />
        <?php }?></a></td> 
     <td class="colActions right"> <a class="actionEdit" href="<?php echo base_url('product/edit')."/".$row['pid']; ?>">Edit</a> <a class="actionDelete" href="<?php echo base_url('product/drop')."/".$row['pid'];?>">Delete</a></td>
   </tr>
  <?php } } ?>

</tbody>
</table>
</form>
<div id="bottomOptions" class="clear">
<form id="formViewOptions" action="#" method="get">
   <div id="viewOptions"> 
      <label for="selItemsPerPage">Items per page:</label> 
      <select id="selItemsPerPage"> 
      <option selected="selected">10</option> 
      <option>25</option>
       <option>50</option>
        <option>100</option>
      </select>
  </div>
</form>
  <ul class="pagination">
   <li class="button small pagePrev">
    <a href="#" title="Previous page">Previous</a></li>
      <?php for($i=1;$i<=$count_page;$i++){?>
       <li> <a href="<?php echo base_url('article/index')."/".$i; ?>"><?php echo $i;?></a></li>
      <?php }?>
           <li class="button small pageNext"> <a href="#" title="Next page">Next</a></li>
 </ul>
 </div>
 </div>
 <div id="sidebar">
<div class="sidebox" id="subnav">
<h1>管理</h1>
<ul> 
<li> <a href="<?php echo base_url('product/index'); ?>">产品列表</a></li> 
<li> <a href="<?php echo base_url('product/index'); ?>">未审核</a></li>
 <li> <a href="<?php echo base_url('product/category'); ?>">产品分类</a></li> 
 </ul>
 </div>
<div class="sidebox clear" id="boxFirst">
<h1>Simple search</h1>
<div class="boxContent clear">
<form method="get" action="#" class="sideForm" id="formFilters">
<fieldset><legend>Search</legend>
<div class="field clear"> 
<label for="txtNameSide">Name:</label> 
<input type="text" value="" class="text full" id="txtNameSide"></div> 
<input type="submit" value="Find" class="button primary" id="btnFind">
</fieldset></form></div></div>
<div class="sidebox clear" id="summary">
<h1>Statistics</h1>
<div class="boxContent clear">
<dl class="clear"><dt>Total files:</dt><dd>525</dd>
<dt>Total size:</dt><dd>346 MB</dd><dt class="last">Disk usage:</dt>
<dd class="last">35%</dd></dl></div></div></div>
</div>
 <div id="push">&nbsp;</div>
 </div>